package data_class

data class User2(var id: Int, var name: String)

fun main(args: Array<String>) {
    val user1 = User2(1, "alex")
    println(user1)

    val user2 = User2(1, "alex")
    val user3 = User2(2, "peter")

    println("user1 == user2 ${user1 == user2}")
    println("user1 == user3 ${user1 == user3}")

    val user4 = user1.copy()
    user4.name = "Bob"
    println(user1)
    println(user4)
    println(user1.copy(id = 2))
    println(user1.copy(id = 121, name = "123"))


}